import api from "./base.js";
// 获取用户openid
export const getOpenId = (config) => {
  api.init({
    url: "/admin-api/hotline/wx-user/weixin-mini-app-login",
    header: {
      "content-type": "application/json",
    },
    ...config,
  });
};
// 注册、登陆
export const userReg = ({ ...config }) => {
  // openid
  api.init({
    url: "/wechat/treemsg/getperson",
    method: "get",
    ...config,
  });
};
// 绑定信息
export const userBind = ({ ...config }) => {
  // id:数据库id
  // personPhone:人员电话
  // local：地址
  // openid：openid
  // avatar：头像
  api.init({
    url: "/wechat/treemsg/person",
    method: "post",
    ...config,
  });
};
